/* 基本重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

a {
    text-decoration: none;
    color: #333;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* 导航栏样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* 主题切换器样式 */
.theme-switcher {
    margin-right: 1rem;
}

.theme-btn {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.theme-btn:hover {
    background-color: #e0e0e0;
}

/* 深色主题样式 */
body.dark-theme {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-theme header {
    background-color: #2d2d2d;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

body.dark-theme .logo {
    color: #8f94fb;
}

body.dark-theme .nav-links a {
    color: #e0e0e0;
}

body.dark-theme .nav-links a:hover {
    color: #8f94fb;
}

body.dark-theme .lang-btn {
    background-color: #404040;
    border: 1px solid #555;
    color: #e0e0e0;
}

body.dark-theme .lang-btn:hover {
    background-color: #555;
}

body.dark-theme .lang-btn.active {
    background-color: #4e54c8;
    color: white;
    border-color: #4e54c8;
}

body.dark-theme .theme-btn {
    background-color: #404040;
    border: 1px solid #555;
    color: #e0e0e0;
}

body.dark-theme .theme-btn:hover {
    background-color: #555;
}

body.dark-theme .hero {
    background: linear-gradient(135deg, #2c2f70, #5a5fbf);
}

body.dark-theme .cta-button {
    background-color: #2d2d2d;
    color: #8f94fb;
}

body.dark-theme .about {
    background-color: #2d2d2d;
}

body.dark-theme .profile-text p {
    color: #ccc;
}

body.dark-theme .skill-tag.tertiary {
    background-color: #404040;
    color: #e0e0e0;
}

body.dark-theme .achievements li:before {
    color: #8f94fb;
}

body.dark-theme .timeline-detail {
    background-color: #3a3a3a;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

body.dark-theme .timeline-detail h4 {
    color: #8f94fb;
}

body.dark-theme .timeline-detail p {
    color: #ccc;
}

body.dark-theme .timeline-year {
    background-color: #4e54c8;
}

body.dark-theme .projects {
    background-color: #252525;
}

body.dark-theme .project-card {
    background-color: #2d2d2d;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

body.dark-theme .project-card h3 {
    color: #8f94fb;
}

body.dark-theme .project-card p {
    color: #ccc;
}

body.dark-theme .contact {
    background-color: #2d2d2d;
}

body.dark-theme .social-links h3 {
    color: #e0e0e0;
}

body.dark-theme #contact-form input,
body.dark-theme #contact-form textarea {
    background-color: #3a3a3a;
    border: 1px solid #555;
    color: #e0e0e0;
}

body.dark-theme #contact-form input::placeholder,
body.dark-theme #contact-form textarea::placeholder {
    color: #aaa;
}

body.dark-theme #contact-form button {
    background-color: #4e54c8;
    color: white;
}

body.dark-theme .social-link {
    background-color: #4e54c8;
    color: white;
}

body.dark-theme footer {
    background-color: #252525;
}

/* 语言切换器样式 */
.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.lang-btn:hover {
    background-color: #e0e0e0;
}

.lang-btn.active {
    background-color: #4e54c8;
    color: white;
    border-color: #4e54c8;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4e54c8;
}

.nav-links {
    display: flex;
}

.nav-links li {
    margin-left: 1.5rem;
}

.nav-links a {
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #4e54c8;
}

/* 主要内容样式 */
main {
    margin-top: 80px;
}

section {
    padding: 4rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* 英雄区域样式 */
.hero {
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    color: white;
    text-align: center;
    padding: 6rem 1rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    background-color: #fff;
    color: #4e54c8;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 关于我区域样式 */
.about {
    background-color: #fff;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.profile-image {
    flex: 1;
    text-align: center;
}

.profile-image img {
    border-radius: 50%;
    width: 250px;
    height: 250px;
    object-fit: cover;
    border: 5px solid #eee;
}

.profile-text {
    flex: 2;
}

.profile-text p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* 技能标签样式 */
.skills {
    margin: 1.5rem 0;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.skill-tag.primary {
    background-color: #4e54c8;
    color: white;
}

.skill-tag.secondary {
    background-color: #8f94fb;
    color: white;
}

.skill-tag.tertiary {
    background-color: #e0e0e0;
    color: #333;
}

/* 个人成就样式 */
.achievements ul {
    list-style-type: none;
    padding: 0;
}

.achievements li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.achievements li:before {
    content: "✓";
    color: #4e54c8;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* 时间线样式 */
.timeline {
    margin-top: 3rem;
}

.timeline-content {
    position: relative;
    padding-left: 3rem;
}

.timeline-content:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #4e54c8;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-top: 0.5rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-year {
    position: absolute;
    left: -3rem;
    top: 0;
    background-color: #4e54c8;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    z-index: 1;
    min-width: 70px;
    text-align: center;
}

.timeline-detail {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-left: 1rem;
}

.timeline-detail h4 {
    margin-bottom: 0.3rem;
    color: #4e54c8;
}

.timeline-detail p {
    margin: 0;
    color: #666;
}

/* 项目区域样式 */
.projects {
    background-color: #f9f9f9;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card h3 {
    padding: 1rem;
    color: #4e54c8;
}

.project-card p {
    padding: 0 1rem 1rem;
    color: #666;
}

/* 联系区域样式 */
.contact {
    background-color: #fff;
    text-align: center;
}

.contact h2 {
    margin-bottom: 2rem;
}

#contact-form {
    display: flex;
    flex-direction: column;
    max-width: 600px;
    margin: 0 auto 2rem;
    text-align: left;
}

#contact-form input,
#contact-form textarea {
    margin-bottom: 1rem;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: #4e54c8;
    box-shadow: 0 0 0 2px rgba(78, 84, 200, 0.2);
    transform: translateY(-2px);
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
    color: #aaa;
    font-style: italic;
}

#contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

#contact-form button {
    background-color: #4e54c8;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s, transform 0.3s;
    margin-top: 0.5rem;
}

#contact-form button:hover {
    background-color: #3a40b0;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 社交媒体链接样式 */
.social-links {
    margin-top: 3rem;
    text-align: center;
}

.social-links h3 {
    margin-bottom: 1rem;
    color: #333;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: #4e54c8;
    color: white;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.social-link:hover {
    background-color: #3a40b0;
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .profile-image {
        margin-bottom: 2rem;
    }
}